package com.hm.prac3;

public class Car extends Vehicle implements IPower{
   private String carNum;

    public Car(String brand, String color, String carNum) {
        super(brand, color);
        this.carNum = carNum;
    }

    public String getCarNum() {
        return carNum;
    }

    public void setCarNum(String carNum) {
        this.carNum = carNum;
    }

    @Override
    public void run() {
        System.out.println("开小汽车");
    }

    @Override
    public void power() {
        System.out.println("加油");
    }
}
